package at.fhooe.engine.physics.forces;

public class DampingForce extends Force {

	private double m_dampingX;
	private double m_dampingY;
	private double m_dampingAngular;
	
	public DampingForce(double dampingX, double dampingY, double dampingAngular) {
		m_dampingX 			= -Math.abs(dampingX);
		m_dampingY 			= -Math.abs(dampingY);
		m_dampingAngular	= -Math.abs(dampingAngular);
	}
	@Override
	public double getAccelerationX(double time, double position, double velocity, double angularPosition) {
		return m_dampingX * velocity;
	}

	@Override
	public double getAccelerationY(double time, double position, double velocity, double angularPosition) {
		return m_dampingY * velocity;
	}
	
	@Override
	public double getAngularAcceleration(double time, double position, double velocity, double angularPosition) {
		return m_dampingAngular * velocity;
	}
}
